home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / UTILITIE / FIXCH302.ZIP / FIXCHARS.DOC < prev    next >
Text File  |  1993-02-01  |  5KB  |  101 lines

  1. FIXCHARS.DOC
  2. 02/01/93
  3.  
  4.  
  5. Introduction:
  6.  
  7. This program reads in any text file (with out without carriage return/line
  8. feeds) and replaces all non-printable characters (except the CR/LF stuff) with
  9. spaces.  Non-printable characters are any characters defined as being below
  10. decimal 32 (except for the CR and LF characters which are 10 and 13
  11. respectively) and any characters above decimal 126.
  12.  
  13. The program can operate in two modes.  The first mode is a BINARY mode which
  14. reads in the file character by character and processes it slowly like this.
  15. BINARY mode is wonderful for files that don't actually have separate lines;
  16. everything's been blocked together and you haven't run something like SPLITREC
  17. on it yet.
  18.  
  19. The second mode is TEXT mode.  This reads the file in a line at a time and
  20. processes the entire line.  This mode is quicker and it is the default for this
  21. routine.  TEXT mode automatically handles tab expansion and it removes backspace
  22. characters.  But you can't use this if your file isn't already there as separate
  23. lines of ASCII text.  (Don't try to handle a native WordPerfect file, for
  24. example, using this mode.)
  25.  
  26.  
  27. Running the program:
  28.  
  29. The programs requires two parameters to be provided in the order specified
  30. below.  It also accepts other optional parameters which can be specified in any
  31. order:
  32.  
  33.     FIXCHARS infile { outfile [ /OVERWRITE | /-OVERWRITE | /OVERASK ] |
  34.       /REPLACE } [ /BINARY | /TEXT ] [ /Ffilename ] [ /-EJECT ] [ /Q ] [ /? ]
  35.  
  36. "infile" is the name of the input file to check.  It can include a drive and
  37. path specification.
  38.  
  39. "outfile" is the name of the file to create.  It can include a drive and path
  40. specification.  You have to specify either an outfile or the /REPLACE option.
  41.  
  42. "/OVERWRITE" says to overwrite the output file if it exists already.
  43.  
  44. "/-OVERWRITE" says to abort if the output file exists already.
  45.  
  46. "/OVERASK" says to prompt if the output file exists already; this is the
  47. default.
  48.  
  49.  
  50. "/REPLACE" says to write the results to a temporary file and, if the program
  51. finds characters to change and runs successfully, to replace the original file
  52. with the fixed temporary file.  The original file is renamed with a BAK
  53. extension if you use this option.  You have to specify *either* an output file
  54. name or the /REPLACE option.
  55.  
  56. "/BINARY" is used if the input file has not been separated into records yet.
  57. The file is read a character at a time.  In BINARY mode, trailing spaces are not
  58. removed on the lines.  BINARY is the safest bet.  BINARY is rather slow,
  59. processing text at the rate of about 1,200 cps.  A 572K file takes a bit under
  60. eight minutes to handle.
  61.  
  62. "/TEXT" is used if the input file consists of normal text records.  Trailing
  63. spaces are removed at the end of each record.  /TEXT mode also handles tab
  64. expansion and removes backspace characters from the file.  /TEXT is the default
  65. mode.  Execution is very quick:  a 48 megabyte file can be processed in just 14
  66. minutes (55,000 cps!).
  67.  
  68. "/Ffilename" specifies the file name to write out the results of this program
  69. too.  By default, a file is created called FIXCHARS.BAD which shows the date,
  70. time, and file name being processed as well as all lines that had problems.  The
  71. file is appended to each time so it contains a running log of what you've run.
  72. You can change this file name to something else (and provide drive and path
  73. information if desired) or you can say /FNUL:  and avoid creating the file
  74. altogether.
  75.  
  76. "/-EJECT" says to translate page eject characters (decimal 12) into spaces.  By
  77. default, page eject characters are left in the document.
  78.  
  79. "/Q" turns off the line-by-line status messages.
  80.  
  81. "/?" or "/HELP" or "HELP" gives you syntactical help.
  82.  
  83.  
  84. The file also keeps a log with the bad characters.  By default, this file is
  85. called FIXCHARS.BAD and it is created in your default directory.  (You can
  86. override the file name specification with the /Ffilename parameter.  You can
  87. also turn it off entirely using the /FNUL:  specification.) If the file already
  88. exists, the log will be appended instead of replaced.  In BINARY mode, the
  89. program writes out the individual characters it didn't like.  In TEXT mode, the
  90. program writes out the entire bad line.
  91.  
  92. Press Esc to quit the program early.
  93.  
  94.  
  95. Program written by Bruce Guthrie.  Comments and suggestions can be sent to:
  96.  
  97.                 Bruce Guthrie
  98.                 Wayne Software
  99.                 113 Sheffield St.
  100.                 Silver Spring, MD 20910
  101.